<div id="postItemRight" style="margin-bottom:10px">
	<input type="hidden" name="avatar_img_server" id="avatar_img_server" value="{$avatarInfo.img_server}" />
    <input type="hidden" name="avatar_img_url" id="avatar_img_url" value="{$avatarInfo.img_url}" />
	<div class="postItemOther-right">
        <div class="postItemOtherAvatar">
            <div class="postItemOtherAvatar-title">
                Ảnh đại diện cho sản phẩm
                <div id="admin_delete_avatar" style="float: right; margin-right: 10px;" class="div_admin_config_form">
                    <a style="cursor: pointer;" alt="Xóa ảnh đại diện" onclick="RemoveAvatarImage();"><img src="style/images/postItem/delete.gif"></a>
                </div>
            </div>
            <div id="avatarWrapper" class="postItemOtherAvatar-img" style="background:url(style/images/no-images-69x53.jpg) no-repeat center; display:table; ">
                <div style="display:table-cell; vertical-align:middle;">
                    <img id="itemAvatar" src="style/images201005/space.gif" lang="notloaded"/>
                </div>
            </div>
            <div class="postItemOtherAvatar-tools">
                <div id="eb_quick_upload" style="display:none;">
                    <label class="cabinet">
                        <a href="#" style="position:absolute;">Chọn ảnh khác</a>
                        <input type="file" id="fast_upload_avatar" name="fast_upload_avatar" class="file" onchange="return ajaxFileUpload();" accept="image/gif,image/jpg,image/jpeg,image/png"/>
                    </label>
                </div>
                <div id="eb_flash_upload" style="display:none;">
                    <div class="postItemOtherAvatar-choiceImg">
                        <span id="spanButtonPlaceholder"></span>
                        <a id="editItem-otherImage" style="cursor:pointer;">Chọn ảnh khác</a>
                    </div>
                </div>
                <div class="postItemOtherAvatar-editImg" style="float:right;"><a id="editItem-editImage" style="cursor:pointer;display:none">Chỉnh sửa ảnh</a></div>
            </div>
        </div>
    </div>
                        
    <div class="postItemImg-title">Chọn ảnh</div>
    {if $multi_upload}
    <div class="mutil-div">
        <div class="postMultiUpload-tools">
        <div id="eb_quick_mupload" style="display:none;">
            <a href="http://get.adobe.com/flashplayer/" target="_blank"><img src="style/images/up_nhieu_anh_no_flash.png" /></a>
        </div>
        <div id="eb_flash_mupload" style="display:none;">
            <span id="spanButtonPlaceholder1"></span>
            <img src="style/images/up_nhieu_anh.png" />
        </div>
        </div>
    </div>
    {/if}
    
  {if $max_image_page}
    <div style="width:100%">
    	{foreach item=images_page key=stt from=$post_item_images}
        	<div class="imgdiv" id="upload_image_panel{$stt}" style="{if $stt>1}display:none;{/if}">
            {foreach item=image key=index from=$images_page}
               <div  id="hilight{$image.stt}" lang="{$image.stt}" class="hilight_img">
                    <div class="image" id="img_thumb{$image.stt}" style="background:url({$image.image_url}) no-repeat center; background-color:#FFF">
                    	<span class="number" >{$image.stt}</span>
                    </div>
                    <div class="right_panel">
                           <input name="image_title[{$image.stt}]" type="text" class="ghichu" style="border:none; height:35px; width:95%;border:#D0D4D3 1px solid; color:#b0adad; padding:5px;" id="image_title_{$image.stt}" onblur="{literal}if(this.value==''){ this.value = 'Ghi chú ảnh';}" onclick="if(this.value=='Ghi chú ảnh'){this.value=''}{/literal}" value="{$image.title}" size="22" maxlength="30" />
                           
                           <div class="Path_img" style=" padding-top:4px;height:21px;">

                            <input id="button_upanh{$image.stt}" style="cursor:pointer" type="button" value="" title="Upload ảnh mới vào thư viện ảnh cá nhân của bạn!" onclick="open_upload({$image.stt});" class="btn_insert_to_content btn_upanh"  onmouseover="this.className='btn_insert_to_content_hover btn_upanh_hover'" onmouseout="this.className='btn_insert_to_content btn_upanh'"/>
                            <input id="open_lib{$image.stt}" style="cursor:pointer;" type="button" value="" title="Chọn ảnh cho Giao dịch từ Thư viện ảnh cá nhân của bạn!"  class="button_gallery btn_insert_to_content btn_gallery" onclick="browser_gallery({$image.stt});"  onmouseover="this.className='btn_insert_to_content_hover btn_gallery_hover'" onmouseout="this.className='btn_insert_to_content btn_gallery'"/>
                            
                            <input style="cursor:pointer;" type="button" value="" title="Nhúng ảnh thứ {$image.stt} vào nội dung!" onclick="mce_embed({$image.stt});" class="btn_insert_to_content btn_nhung" onmouseover="this.className='btn_insert_to_content_hover btn_nhung_hover'" onmouseout="this.className='btn_insert_to_content btn_nhung'"/>
                        	
                            <input style="cursor:pointer; background:url(style/images/postItem/delete.gif) no-repeat; width:14px; height:14px; border:none;{if !$image.have_img}display:none{/if}" type="button" value="" title="Loại bỏ ảnh"  id="del_btn{$image.stt}" onclick="del_image({$image.stt});" lang="{$image.stt}" />
                            </div>
                    </div>
                    
                    <input type="hidden" value="{$image.img_new_id}" name="img_new[{$image.stt}]" id="img_new{$image.stt}"/>
                    <input type="hidden" value="{$image.img_server}" name="i_server[{$image.stt}]" id="i_server{$image.stt}"/>
                    <input type="hidden" value="{$image.i_url}" name="i_url[{$image.stt}]" id="i_url{$image.stt}"/>
                    <input type="hidden" value="{$image.img_del_id}" name="image_deleted[{$image.stt}]" id="image_deleted_{$image.stt}"/>
                    <input type="hidden" value="{$image.id}" name="ids[{$image.stt}]" id="ids_{$image.stt}" />
                </div>	
              <div style="width:100%" align="left"><div class="rule"></div></div>
            {/foreach}
            </div>
      	{/foreach}
     </div>
    {/if} 
</div>
<script>
//var cur_max_page		= 1;
var zid = {if $zid}{$zid}{else}0{/if};
var max_image_page 		= {$max_image_page};
var images_per_page 	= {$images_per_page};
var level_1_catid 		= 0;
var level_2_catid 		= 0;
var first_combo_value 	= {$first_combo};
var second_combo_value 	= {$second_combo};
var category_tree 		= {$category_tree};
var currency 			= {$currency_tree};
var jsImages 			= {if $jsImages}{$jsImages}{else}[]{/if};
var avatar		 		= {if $avatar}{$avatar}{else}''{/if};

var catlist_type 			= {if $catlist_type}{$catlist_type}{else}[]{/if};

var read_count = {if $read_count > 0}{$read_count}{else}0{/if};
var reply_count = {if $reply_count}{$reply_count}{else}0{/if};
//var img_ádgk = {$img_fnkjgk};

var image_path			= '{$image_path}';
var img_cur_server		= {$img_cur_server};
var img_server			= {$img_server};

var no_img_thumb		= '{$no_img_thumb}';
var no_img 				= '{$no_img}';
var no_img_upload		= '{$no_img_upload}';
var current_img_id		= 1;
var user_name			= '{$user_name}';
var item_user_id		= {$item_user_id};
var is_can_edit			= {$is_can_edit};

var az_filters			= {$az_filters};
var item_filters		= '{$item_filters}';
</script>
<!-- UP ảnh -->